package com.yxb.consumer.controller;

import com.yxb.consumer.feign.UserFeign;
import com.yxb.consumer.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @PackgeName: com.yxb.consumer.controller
 * @ClassName: ConsumerFeginController
 * @Author: CongR
 * Date: 2021/3/18 15:30
 * project name: springcloud
 * @Version:
 * @Description:
 */
@RestController
@RequestMapping("cg")
public class ConsumerFeginController {

    @Autowired
    UserFeign userFeign;
    @GetMapping("/{id}")
    public User queryFeginById(@PathVariable Long id) {
        return userFeign.queryById(id);
    }


}
